package com.itheima;

import com.itheima.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author cp
 * @className App
 * @description TODO
 * @create 2020/12/6 15:12
 **/
public class App {
    public static void main(String[] args) {
//        加载配置文件
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
//        获取资源
        UserService service = (UserService) applicationContext.getBean("userService");
        service.save();
    }
}
